for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import {Entity, Column, PrimaryGeneratedColumn, ManyToOne} from 'typeorm';
import {Quote} from './Quote.entity';
@Entity()
export class QuoteItem {
@PrimaryGeneratedColumn('uuid')
private id: string;
@Column({type: 'varchar', nullable: false})
private title: string;
@Column({type: 'integer', nullable: false})
private quantity: number;
private dailyRate: number;
@ManyToOne(
type => Quote,
quote => quote.items,
{nullable: false}
)
quote: Quote;
constructor(
title: string,
quantity: number,
dailyRate: number,
quote: Quote
) {
this.title = title;
this.quantity = quantity;
this.dailyRate = dailyRate;
this.quote = quote;
}
public getTitle(): string {
return this.title;
public getDailyRate(): number {
return this.dailyRate;
public getQuantity(): number {
return this.quantity;